{template 'common/header'}
<ul class="nav nav-tabs">
    <li ><a href="{php echo url('sms/dict/list');}">短信项目信息列表</a></li>
    {if $id}
    <li class="active" ><a href="{php echo url('sms/dict/post');}">修改短信项目信息</a></li>
    {else}
    <li class="active" ><a href="{php echo url('sms/dict/post');}">增加短信项目信息</a></li>
    {/if}
</ul>
<div class="clearfix">
    <form class="form-horizontal form" action="{php echo url('sms/dict/post');}" method="post" id="form1">
        <input type="hidden" name="id" value="{$row['id']}" />

        <div class="form-group">
            <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">短信项目</label>
            <div class="col-sm-5">
                <input type="text" id="title" class="form-control" name="title" value="{$row['title']}"  placeholder="请输入短信项目"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label">显示顺序</label>
            <div class="col-sm-5">
                <input type="text" id="disporder" class="form-control" name="disporder" value="{$row['disporder']}"  placeholder="请输入显示顺序"/>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-12 col-sm-2 col-md-2 col-lg-1 control-label"></label>
            <div class="col-sm-10">
                <button type="submit" class="btn btn-primary" name="submit" value="提交">提交</button>
                <input type="hidden" name="token" value="{$_W['token']}" />
            </div>
        </div>
    </form>
</div>
<script type="text/javascript">
    require(['jquery', 'util'], function($, u){
        $("#form1").submit(function(){

            if($("#title").val() == '') {
                u.message('数据为必填项，请返回修改！', '', 'error');
                return false;
            }

            return true;
        });
    });

</script>
{template 'common/footer'}